import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router/index'
import store from '@/store/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import api from '@/api'
import * as ElIcons from '@element-plus/icons-vue'
import Row from './components/Layout/Row/index.vue'
import Col from './components/Layout/Col/index.vue'

const app = createApp(App);

app.config.globalProperties.$api = api  // api

for (const name in ElIcons){
  app.component(name,(ElIcons as any)[name])
}

// 全局注册组件
app.component('wei-row', Row)
app.component('wei-col', Col)
app.use(router).use(store).use(ElementPlus).mount('#app')
